<?php
namespace app\common\model;

use think\Model;
use think\Db;

class UserMsgModel extends Model
{
    protected $name = 'user_msg';

    public function list()
    {
        return Db::name('user')
            ->alias('u')
            ->rightJoin('p_user_msg um', 'um.uid = u.uid')
            ->field('um.*, u.uid,u.phone,u.username')
            ->order('um.id desc');
    }
}
